#!/usr/bin/env python
#    dft_qr_sym
#    ------------------
#    Molecule:         H2O
#    Wave Functions:   DFT B3LYP / STO-3G
#    Test Purpose:     DFT B3LYP hyperpolarizability test w/ symmetry.

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(string = 'Final DFT energy',
      rel_tolerance = 1.0e-8)

f.add(re = 'beta\([XYZ];[XYZ],[XYZ]\)',
      rel_tolerance = 1.0e-5)

test.run(['dft_qr_nosym.dal'], ['H2O_3-21G_nosym.mol'], f={'out': f})
test.run(['dft_qr_sym.dal'], ['H2O_3-21G_sym.mol'], f={'out': f})

sys.exit(test.return_code)
